﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Intrinsics.Arm;
using System.Text;
using System.Threading.Tasks;
using Messhall.Application.Dto;
using Messhall.Application.Dto.Users;
using Messhall.Application.Dto.Users.Requests;
using Messhall.Application.Dto.Users.Responses;
using Microsoft.AspNetCore.Mvc;

namespace Messhall.HostService.Interface.Permission
{
    [Messhall.Framework.Attributes.Route("/api/users")]
    public interface IUsers
    {
        /// <summary>
        /// 创建用户
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [Route("create")]
        Task<bool> CreateAsync([FromBody] CreateUserRequest request);

        /// <summary>
        /// 获取用户列表
        /// </summary>
        [HttpGet]
        [Route("paging")]
        Task<PagingResponseBase<UserPagingResponse>> PagingAsync([FromQuery] UserPagingRequest request);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpDelete]
        [Route("remove")]
        Task RemoveAsync([FromBody] RemoveUsersRequest request);

        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPut]
        [Route("update")]
        Task<bool> UpdateAsync(UpdateUserRequest request);
    }
}